<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/6
 * Time: 20:55
 */

header("Content-type:text/html;charset=utf-8");
require_once "../config/database.php";
require_once "userDb.php";
$UserDb=new UserDb();
$user=$_GET['user'];
$data=$UserDb->selectTaskUser($user);
$sum=count($data);

try {
    $result = $data;

    if ($result) {
        $dat = array(
            'code'=>0,
            'count'=>$sum,
            'msg' =>"查询成功",
            'data'=>$data,
        );
        echo json_encode($dat);
    }
    else {

        echo "数据获取异常";
    }
}
catch (Exception $e) {
    echo $e->getMessage();
}
